import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { LockScreenLeaveGuard } from '@core/base';
import { LayoutBlankComponent } from '@layout/blank/blank.component';
import { LayoutSimpleComponent } from '@layout/simple/simple.component';

const routes: Routes = [
  { path: 'lock-screen', component: LayoutBlankComponent, canDeactivate: [LockScreenLeaveGuard], loadChildren: () => import('./lock-screen/lock-screen.module').then(m => m.LockScreenModule) },
  { path: 'exception', component: LayoutBlankComponent, loadChildren: () => import('./exception/exception.module').then(m => m.ExceptionModule) },
  { path: 'about', component: LayoutSimpleComponent, loadChildren: () => import('./about/about.module').then(m => m.AboutModule) }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class BaseRoutingModule {}
